package com.navinfo.platform.test;


import com.alibaba.fastjson.JSON;

public class testjson {
    public static class Outer {

        private int a;

        private String b;

        public int getA() {

            return a;

        }

        public void setA(int a) {

            this.a = a;

        }

        public String getB() {

            return b;

        }

        public void setB(String b) {

            this.b = b;

        }

}

    public static class Outer2 {

        private int a;

        private String b;

        private int c;

        public int getA() {

            return a;

        }

        public void setA(int a) {

            this.a = a;

        }

        public int getC() {

            return c;

        }

        public void setC(int c) {

            this.c = c;

        }
        public String getB() {

            return b;

        }

        public void setB(String b) {

            this.b = b;

        }

    }


    public static void main(String[] args) {
        Outer out = new Outer();
        out.setA(111);
        out.setB("222");
        String json = JSON.toJSONString(out);

        Outer2 out2 = JSON.parseObject(json,Outer2.class);

    }

}